﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace SL8.SL.Extensions
{
    /// <summary>
    /// 验证命令扩展
    /// </summary>
    public static class ValidateService
    {
        public static readonly DependencyProperty ValidateCommandProperty =
            DependencyProperty.RegisterAttached("ValidateCommand",
            typeof(ICommand),
            typeof(ValidateService),
            null);

        public static ICommand GetValidateCommand(DependencyObject d)
        {
            return (ICommand)d.GetValue(ValidateService.ValidateCommandProperty);
        }

        public static void SetValidateCommand(DependencyObject d, ICommand value)
        {
            d.SetValue(ValidateService.ValidateCommandProperty, value);
        }
    }
}
